﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_qxgl_insert_dba : System.Web.UI.Page
{
    DataClassesDataContext db1 = new DataClassesDataContext();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack == true)
        {
            MultiView1.SetActiveView(View1);
        }
    }
    protected void Button1_Click1(object sender, EventArgs e)
    {
        int? i;
        string psw = TextBox1.Text.ToString();
        i = db1.proc_LoginCheck((String)Session["phone"], psw);
        if (i == 1)
        {
            MultiView1.SetActiveView(View2);
        }
        else
        {
            Response.Write("<script>alert('密码输入错误！');</script>");
        }
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        db1.proc_AddAdmin(TextBox3.Text.ToString(), TextBox4.Text.ToString(), TextBox2.Text.ToString(), TextBox5.Text.ToString());
        Response.Write("<script>alert('管理员添加成功！');</script>");
    }
}